package src;

public class Event {
	String operation;
	int node;
	int time;
	int key;
	int value;
	
	public Event(String operation, int time, int node, int key, int value){
		this.operation = operation;
		this.time = time;
		this.node = node;
		this.key = key;
		this.value = value;
	}
	
	public Event(String operation, int time, int node, int key){
		this.operation = operation;
		this.time = time;
		this.node = node;
		this.key = key;
	}
	
	
	public String toString() {
		String returnstring = operation + "," + time + "," + node + "," + key;
		if(!operation.equals("delete")) {
			returnstring += "," + value;
		}
		return returnstring += ":";
	}

	
	public int getKey() {
		return key;
	}


	public void setKey(int key) {
		this.key = key;
	}


	public int getValue() {
		return value;
	}


	public void setValue(int value) {
		this.value = value;
	}


	public String getOperation() {
		return operation;
	}

	public void setOperation(String operation) {
		this.operation = operation;
	}

	public int getNode() {
		return node;
	}

	public void setNode(int node) {
		this.node = node;
	}

	public void setTime(int time) {
		this.time = time;
	}

	public int getTime() {
		return this.time;
	}


}
